Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add free trial pricing table to emails when appropriate #452

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

travis
Copy link
Member

@travis travis commented Dec 11, 2024

We are now offering free trials to users who come referred by other users, so we need to be able to display an alternate pricing table to those users.

This PR adds a check to the "email validated" screen that determines whether to offer users a free trial. It queries the referral service and renders the "free trial" pricing table if the user was referred.

This PR also removes some log lines that I accidentally introduced in a recent PR.

We are now offering free trials to users who come referred by other users, so we need to be able to display an alternate pricing table to those users.

This PR adds a check to the "email validated" screen that determines whether to offer users a free trial. It queries the referral service and renders the "free trial" pricing table if the user was referred.

This PR also removes some log lines that I accidentally introduced in a recent PR.
Copy link

seed-deploy bot commented Dec 11, 2024

View stack outputs

Copy link
Member

@fforbeck fforbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Peeja Peeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions, but not blocking. I'll leave it to your judgement.

Comment on lines 239 to 243
if (isReferred) {
stripePricingTableId = context.stripeFreeTrialPricingTableId
} else {
stripePricingTableId = context.stripePricingTableId
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: …I'm not totally sure what generates these errors for us, but whatever it is, I agree with it. 😄 Let's prefer the ternary to mutating a variable.

trial - pick a plan below and complete the checkout flow to get started!
</p>
<p>
Please note that after your free trial ends, you will be charged 10 USD per month for Lite or 100 USD per month for Business tier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is it safe to write these values here literally? They won't update if the pricing changes.

also add a couple useful env vars
also bump maxRetries back down because I never saw it take more than 3
@seed-deploy seed-deploy bot temporarily deployed to pr452 December 12, 2024 00:52 Inactive
@travis travis merged commit e364507 into main Dec 12, 2024
3 checks passed
@travis travis deleted the feat/referrals-pricing-table branch December 12, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants